<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Game extends Model
{
    protected $table = 'game';

    protected $guarded = [''];

    protected function getDateFormat()
    {
        return 'U';
    }

    public function activity()
    {
        return $this->belongsTo('App\Models\Activity', 'activity_id', 'id');
    }

    public function prize()
    {
        return $this->hasMany('App\Models\GamePrize', 'game_id', 'id');
    }

    public function type()
    {
        return $this->belongsTo('App\Models\GameType', 'type_id', 'id');
    }
}
